#!/bin/bash

function SafePwrCycle() {
    sync ; sync
    umount -fa > /dev/null 2&>1

    # Write CPLD register to initiate cold reboot
    sudo i2cset -f -y 0 0x41 0x10 0x00
}

SafePwrCycle
